﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:c="clr-namespace:SilverBox.Controls">
    <Style TargetType="c:CoverFlowItemControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c:CoverFlowItemControl">
                    <Grid x:Name="LayoutRoot">
                        <Grid RenderTransformOrigin=".5,.5">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1" />
                                    <TranslateTransform x:Name="translateTransform" />
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Grid.Projection>
                                <PlaneProjection x:Name="Rotator" CenterOfRotationX="0.5" />
                            </Grid.Projection>
                            <ContentControl x:Name="ContentPresenter" RenderTransformOrigin="0.5,0.5" Cursor="Hand" >
                                <ContentPresenter/>
                            </ContentControl>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="c:CoverFlowControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid x:Name="LayoutRoot">
                        <Grid.OpacityMask>
                            <LinearGradientBrush EndPoint="0,.5" StartPoint="1,.5">
                                <GradientStop Color="#00000000" Offset="1"/>
                                <GradientStop Color="#FF000000" Offset="0.8"/>
                                <GradientStop Color="#FE000000" Offset="0.2"/>
                                <GradientStop Color="#00000000" Offset="0"/>
                            </LinearGradientBrush>
                        </Grid.OpacityMask>
                        <Grid x:Name="itemsPresenterGrid" Background="Black" Opacity=".01">
                        </Grid>
                        <Canvas x:Name="itemsPresenterCanvas">
                            <TextBlock x:Name="info" Foreground="White" Canvas.Left="400" Canvas.Top="0" />
                            <ItemsPresenter x:Name="ItemsPresenter" Height="{TemplateBinding Height}"/>
                        </Canvas>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <Canvas x:Name="itemCanvas" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
